<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStoreNavigationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('store_navigations', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('store_id')->unsigned()->comment('店铺 ID')->index();
            $table->string('title')->comment('导航标题');
            $table->boolean('display')->default(true)->comment('是否可视');
            $table->tinyInteger('sort')->default(0)->comment('排序');
            $table->text('content')->comment('导航内的默认显示内容');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('store_navigations');
    }
}
